package com.usian.search.controller;

import com.google.common.annotations.GwtCompatible;
import com.usian.apis.search.ApUserSearchControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.UserSearchDto;
import com.usian.search.service.ApUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.ws.rs.Path;

/**
 * ClassName: ApUserSearchController
 * Author:   WGG
 * Date:    2022-12-2022/12/10-16:35
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/apUserSearch/api")
public class ApUserSearchController implements ApUserSearchControllerApi {

    @Autowired
    private ApUserSearchService apUserSearchService;


    @Override
    @PostMapping("/findApUserSearch")
    public ResponseResult findApUserSearch(@RequestBody UserSearchDto dto) {
        return apUserSearchService.findApUserSearch(dto);
    }

    @Override
    @DeleteMapping("/updateStatus/{id}")
    public ResponseResult updateStatus(@PathVariable("id") Integer id) {
        return apUserSearchService.updateStatus(id);
    }
}
